﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="UpdatePetitionReceive.aspx.cs" Inherits="KPIS.GERP.GFMS.APP.App_UI.Forms.UpdatePetitionReceive" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <link href="../CssClass.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../Scripts/Common.js" type="text/jscript"></script>
    <script language="JavaScript" src="../Scripts/DatePicker.js" type="text/jscript"></script>
</head>
<body>
    <form id="form1" runat="server" style="font-family: 'Tahoma'; font-size: small;" >
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function returnToParent() {
            var oArg = new Object();
            var oWnd = GetRadWindow();

            oWnd.close(oArg);
        }
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <%--<AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>--%>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
    </telerik:RadAjaxLoadingPanel>

    <asp:Label ID="lblBgmSourceSeq" runat="server" Visible="false" />
    <asp:Panel ID="PanelReceive" runat="server">
        <div class="DivInfo" style="font-weight: bold">
            <table>
                <tr>
                    <td>
                        บันทึกรับเงินจากการขอเบิก
                    </td>
                    <td>
                        <asp:Label ID="lblPetitionNo1" runat="server" ForeColor="Blue" />
                        <asp:Label ID="lblReceiveSeq" runat="server" Visible="false" />
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td align="right" width="150px">
                        ปีงบประมาณ :
                    </td>
                    <td>
                        <asp:Label ID="lblBgmYear1" runat="server" ForeColor="Blue" />
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td align="right" width="150px">
                        แหล่งเงิน :
                    </td>
                    <td>
                        <asp:Label ID="lblBgmSourceName1" runat="server" ForeColor="Blue" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="DivBody">
            <table>
                <tr>
                    <td align="right" width="150px">
                        วันที่ได้รับเงิน :
                    </td>
                    <td>
                        <uc1:DatePicker ID="dpReceiveDate" runat="server" />
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td align="right" width="150px">
                        โอนเข้าบัญชีเลขที่ :
                    </td>
                    <td>
                        <telerik:RadComboBox ID="ddlBankAccSeq" runat="server" Width="350px"
                            DataTextField="bank_acc_name" DataValueField="bank_acc_seq" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <asp:Panel ID="PanelPayment" runat="server">
        <div class="DivInfo">
            <table style="font-weight: bold">
                <tr>
                    <td>
                        บันทึกจ่ายตรงจากรายการขอเบิก
                    </td>
                    <td>
                        <asp:Label ID="lblPetitionNo2" runat="server" ForeColor="Blue" />
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td align="right" width="150px">
                        ปีงบประมาณ :
                    </td>
                    <td>
                        <asp:Label ID="lblBgmYear2" runat="server" ForeColor="Blue" />
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td align="right" width="150px">
                        แหล่งเงิน :
                    </td>
                    <td>
                        <asp:Label ID="lblBgmSourceName2" runat="server" ForeColor="Blue" />
                    </td>
                </tr>
            </table>
            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="grdPetitionDtls" runat="server" AutoGenerateColumns="false"
                AllowMultiRowEdit="false" AllowMultiRowSelection="false" Skin="Outlook"
                ShowStatusBar="false" AllowPaging="false" AllowSorting="false" AllowFilteringByColumn="false"
                Width="100%"
                GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                GroupingSettings-GroupContinuedFormatString=""
                GroupingSettings-GroupContinuesFormatString=""
                GroupingSettings-GroupSplitFormat="">
                <%--OnItemCommand="RadGrid1_ItemCommand"--%>
                <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1"  Width="100%"
                    DataKeyNames="petition_dtls_seq" NoMasterRecordsText="< ไม่มีข้อมูล >">
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="petition_dtls_seq"
                            UniqueName="petition_dtls_seq" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="money_req_seq"
                            UniqueName="money_req_seq" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="contact_seq"
                            UniqueName="contact_seq" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="event_seq"
                            UniqueName="event_seq" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="pay_seq"
                            UniqueName="pay_seq" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount_tax"
                            UniqueName="amount_tax" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount_penalty"
                            UniqueName="amount_penalty" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount_redemption"
                            UniqueName="amount_redemption" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount_fund"
                            UniqueName="amount_fund" Visible="False">
                        </telerik:GridBoundColumn>
                                            
                        <telerik:GridBoundColumn DataField="ref_no" HeaderText="เลขที่รอเบิก"
                            HeaderStyle-Width="80px"
                            UniqueName="ref_no" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="money_req_name" HeaderText="ชื่อรายการรอเบิก"
                            UniqueName="money_req_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>
                        <%--<telerik:GridBoundColumn DataField="method_name" HeaderText="วิธีการจ่าย"
                            HeaderStyle-Width="80px"
                            UniqueName="method_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>--%>
                        <telerik:GridBoundColumn DataField="payable_name" HeaderText="เจ้าหนี้"
                            HeaderStyle-Width="100px"
                            UniqueName="payable_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount" HeaderText="ขอเบิก"
                            HeaderStyle-Width="80px"
                            UniqueName="amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False"
                            DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount_real" HeaderText="จ่ายสุทธิ"
                            HeaderStyle-Width="80px"
                            UniqueName="amount_real" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False"
                            DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                        FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                        NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                        PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="false" EnablePostBackOnRowClick="false">
                    <Selecting AllowRowSelect="false" />
                </ClientSettings>
            </telerik:RadGrid>
        </div>
        <div class="DivBody">
            <table>
                <tr>
                    <td align="right" width="150px">
                        วันที่จ่ายตรง :
                    </td>
                    <td>
                        <uc1:DatePicker ID="dpRealPayDate" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <div class="DivBody">
        <table>
            <tr>
                <td align="right" width="150px">
                    จำนวนเงิน :
                </td>
                <td width="150px" align="right">
                    <asp:Label ID="lblAmount" runat="server" ForeColor="Blue" />
                </td>
                <td>
                    บาท
                </td>
            </tr>
        </table>
        <table width="100%" style="border-bottom-style: solid; border-width: 1px; font-weight: bold;">
            <tr>
                <td>
                    เบิกหักผลักส่ง
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td width="150px" align="right">
                    ภาษี ณ ที่จ่าย :
                </td>
                <td width="150px" align="right">
                    <asp:Label ID="lblTax" runat="server" ForeColor="Blue" />
                </td>
                <td>
                    บาท
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td width="150px" align="right">
                    ค่าปรับ :
                </td>
                <td width="150px" align="right">
                    <asp:Label ID="lblPenalty" runat="server" ForeColor="Blue" />
                </td>
                <td>
                    บาท
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td width="150px" align="right">
                    ประกันผลงาน :
                </td>
                <td width="150px" align="right">
                    <asp:Label ID="lblRedemption" runat="server" ForeColor="Blue" />
                </td>
                <td>
                    บาท
                </td>
            </tr>
        </table>
        <table style="border-bottom-style: solid; border-width: 1px; font-weight: bold;">
            <tr>
                <td width="150px" align="right">
                    รวม :
                </td>
                <td width="150px" align="right">
                    <asp:Label ID="lblAmountReal" runat="server" ForeColor="Blue" />
                </td>
                <td>
                    บาท
                </td>
            </tr>
        </table>
    </div>
    <%--</asp:Panel>--%>
    <div class="DivInfo" align="center">
        <asp:LinkButton ID="cmdOK" runat="server" CssClass="LinkButtonBig" OnClick="cmdOK_Click" OnClientClick="returnToParent()">
            <img alt="" id="imgOK" runat="server" src="~/App_UI/Images/Buttons/Update.gif" /> ตกลง
        </asp:LinkButton>
    </div>
</form>
</body>
</html>
